package com.example.demo;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
  public class MyListener implements ServletContextListener {
  @Override
  public void contextInitialized(ServletContextEvent sce) {
        System.out.println("----Web 应用初始化完成----");
        }
  @Override
  public void contextDestroyed(ServletContextEvent sce) {
         System.out.println("----Web 应用销毁之前----");
         }
  }
